package com.ls.lsqc.common.persistence;

public class AjaxDone {
    
    public final static String STATUSCODEOK = "200";
    public final static String STATUSCODEERROR = "300";
    
    /**
     * 操作结果状态
     */
    private  String statusCode = STATUSCODEOK;
    
    /**
     * 返回的消息
     */
    private String message;

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    
    public static AjaxDone ok(String message){
        AjaxDone ajaxDone = new AjaxDone();
        ajaxDone.setStatusCode(STATUSCODEOK);
        ajaxDone.setMessage(message);
        return ajaxDone;
    }
    
    public static AjaxDone error(String message){
        AjaxDone ajaxDone = new AjaxDone();
        ajaxDone.setStatusCode(STATUSCODEERROR);
        ajaxDone.setMessage(message);
        return ajaxDone;
    }

}
